/**
 * 用户相关的所有ajax函数
 */

import request from '@/utils/request'

/* 登录 */
export const checkLogin = (data) => {
    return request({
        url: '/users/checkLogin',
        method: 'post',
        data
    })
}

/* 检查账号是否重复 */
export const checkAccountRepeat = (data) => {
    return request({
        url: '/users/repeat',
        method: 'post',
        data
    })
}

/* 添加账号 */
export const addAccount = (data) => {
    return request({
        url: '/users/add',
        method: 'post',
        data
    })
}

/* 获取账号列表 */
export const getAccountList = (params) => {
    return request({
        url: '/users/list',
        method: 'get',
        params
    })
}

/* 删除账号 */
export const deleteAccount = (params) => {
    return request({
        url: '/users/del',
        method: 'get',
        params
    })
}
 